#include <stdio.h>
#include <math.h>

int foo(int x)
{
    int i;

    for ( i = 1; i <= 20; i++ ) {
        if( fmod(x, i) != 0 )
            return 0;
    }
    return 1;
}

int
main(void)
{
    int curint;

    curint = 2530;
    
    while( 1 )
    {
        if ( foo(curint) )
            break;
        curint += 10;
    }

    printf("%d\n", curint);

    return 0;
}

